package com.u2ds.core;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Configuration
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@ComponentScan(basePackages = {"com.u2ds"})
public class Application {
    private static Logger logger = LoggerFactory.getLogger(Application.class);
    public static Map<String, Object> systemParamsMap = new HashMap<String, Object>();
//	@Bean
//	public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(){
//        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
//        List<MediaType> mediaTypeList = new ArrayList<MediaType>();
//        mediaTypeList.add(MediaType.TEXT_HTML);
//        mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8);
//        converter.setSupportedMediaTypes(mediaTypeList);
//        return converter;
//	}

    @PostConstruct
    public void init() {

    }

}
